/**
  * Menu Theme: dropdown8
  * Theme ID: d8
  * Author: Minwe (minwe@yunshipei.com)
  */

.am-menu-dropdown8 {

  @white: #FFF;

  @lv1-color: @white;
  @lv1-bg-color: #727B8A;
  @lv1-active-bg-color: #586474;

  @lv2-color: #383C40;
  @lv2-bg-color: #F2F3F5;

  @border-color: #ddd;

  position: relative;

  a {
    &::before, &::after {
      .am-icon-font;
    }
  }
  // level 1: trigger bars
  > li {
    > a {
      position: relative;
      background-color: @lv1-bg-color;
      color: @lv1-color;
      text-align: center;
      border-right: 1px solid darken(@lv1-bg-color, 10%);
      border-left: 1px solid lighten(@lv1-bg-color, 10%);
      .transition(all 0.3s);
    }

    &.am-parent {
      > a {
        &::after {
          content: @fa-var-caret-down;
          margin-left: 5px;
        }
      }
    }

    &.am-open {
      > a {
        background-color: @lv1-active-bg-color;
        &::after {
          content: @fa-var-caret-up;
        }

        &::before {
          content: @fa-var-caret-up;
          position: absolute;
          color: @border-color;
          font-size: 24px;
          top: 100%;
          margin-top: -15px;
          left: 50%;
          margin-left: -12px;
        }
      }
    }
  }

   // hide sub menu
  .am-menu-sub {
    display: none;
  }

  .am-menu-lv2 {
    background-color: @lv2-bg-color;
    position: absolute;
    left: 0;
    right: 0;
    z-index: @z-index-dropdown;
    & > li {
      // parent links
      > a {
        padding: 0.8rem;
        border-bottom: 1px solid @border-color;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
        background-color: @lv2-bg-color;
        color: @lv2-color;
      }
    }
  }

  .hook-am-menu-dropdown8;

  @media @medium-up {
    & {
      .am-menu-lv2 {
        left: auto;
        right: auto;
        li {
          width: auto;
          clear: none;
          a {
            border-bottom: none;
            box-shadow: none;
            padding-left: 1.5rem;
            padding-right: 1.5rem;
            &:after {
              content: "";
            }
          }
        }
      }
    }
  }
}

.hook-am-menu-dropdown8() {};